#include "media/branch/MediaBranchAC.h"

MediaBranchAC::MediaBranchAC(){
    QFont userFont("KaiTi_GB2312", 10);
    Login_head->doconfigur_imgsetting(NT::DRAWTYPE_ROUND, NT::PIXLOAD_IGNORERATIO_LOWER);
    Login_headHbox->addWidget(Login_head, Qt::AlignHCenter);
    Login_headHbox->setContentsMargins(0, 0, 0, 10);

    Login_idLibox->g_linedit()->setMaxLength(18);
    Login_idLibox->g_linedit()->setAlignment(Qt::AlignCenter);
    Login_idLibox->g_linedit()->setPlaceholderText("User");
    Login_idLibox->g_linedit()->setClearButtonEnabled(true);
    Login_idLibox->d_rightico_pix(":/PIXMAP/bench/top-lowkey.png",
                                 ":/PIXMAP/bench/top-sharp.png",
                                 ":/PIXMAP/bench/down-lowkey.png",
                                 ":/PIXMAP/bench/down-sharp.png");
    Login_idLibox->d_filler(QColor(255,255,255));
    Login_idLibox->d_filler_on(NTitleBar::BACKCOLOR, true);
    Login_idLibox->ico(NT::LOCALTION_CENTER_RIGHT)->doconfigur_imgsetting(NT::DRAWTYPE_RECT, NT::PIXLOAD_IGNORERATIO_LOWER, 6);

    Login_keyLine->setEchoMode(QLineEdit::Password);
    Login_keyLine->setMaxLength(18);

    //Login_keyLin
    Login_keyLine->setAlignment(Qt::AlignCenter);
    Login_keyLine->setPlaceholderText("Password");
    Login_keyLine->setClearButtonEnabled(true);

    Login_autoLogincBox->setAttribute(Qt::WA_TranslucentBackground);
    Login_autoLogincBox->setText("auto login");
    Login_fillkeycBox->setAttribute(Qt::WA_TranslucentBackground);
    Login_fillkeycBox->setText("filling key");

    Login_forgetKey->doconfigur_text("retrieve");
    Login_forgetKey->doconfigur_fontgroup({{MSEVKEY.WIN_NORMAL, QFont("KaiTi_GB2312", 11)}});
    Login_forgetKey->doconfigur_colorgroup({{MSEVKEY.WIN_NORMAL, QColor(242,241,247)},
                                            {MSEVKEY.WIN_ENTER, QColor(212,233,255)}});

    Login_assistHbox->addWidget(Login_autoLogincBox);
    Login_assistHbox->addWidget(Login_fillkeycBox);
    Login_assistHbox->addWidget(Login_forgetKey);
    Login_assistHbox->setSpacing(3);

    Login_innerVbox->addLayout(Login_headHbox);
    Login_innerVbox->addWidget(Login_idLibox);
    Login_innerVbox->addWidget(Login_keyLine);
    Login_innerVbox->addLayout(Login_assistHbox);
    Login_innerVbox->addWidget(Login_sumbit);
    Login_innerVbox->setSpacing(5);
    Login_innerVbox->setAlignment(Qt::AlignHCenter);
    Login_innerVbox->setContentsMargins(0, 0, 0, 0);

    Login_idLibox->g_linedit()->setFont(userFont);
    Login_keyLine->setFont(userFont);

    Login_Vbox->addWidget(Login_inner, 0, Qt::AlignCenter);
    Login_Widget->doconfigur_pixmap(":/PIXMAP/bench/music-loginback.jpg");

    //------User Login------"""
    Register_verifyHbox->addWidget(Register_verifyWin);
    Register_verifyHbox->addWidget(Register_verifyinput);

    Register_idLine->setPlaceholderText("User");
    Register_keyLine->setPlaceholderText("Password");
    Register_QkeyLine->setPlaceholderText("QPassword");
    Register_verifyinput->setPlaceholderText("Verification");
    Register_aliasLine->setPlaceholderText("User Name");

    Register_roofVbox->addWidget(Register_idLine);
    Register_roofVbox->addWidget(Register_keyLine);
    Register_roofVbox->addWidget(Register_QkeyLine);
    Register_roofVbox->addWidget(Register_aliasLine);
    Register_roofVbox->addLayout(Register_verifyHbox);

    Register_bottomVbox->addWidget(Register_sumbit);

    Register_innerVbox->addLayout(Register_roofVbox);
    Register_innerVbox->addLayout(Register_bottomVbox);

    Register_roofVbox->setContentsMargins(0, 0, 0, 0);
    Register_bottomVbox->setContentsMargins(0, 0, 0, 0);
    Register_innerVbox->setContentsMargins(0, 0, 0, 0);
    Register_mainVbox->setContentsMargins(0, 0, 0, 0);
    Register_verifyHbox->setContentsMargins(0, 0, 0, 0);

    Register_roofVbox->setSpacing(7);
    Register_bottomVbox->setSpacing(0);
    Register_innerVbox->setSpacing(10);
    Register_mainVbox->setSpacing(0);
\
    Register_idLine->setFont(userFont);
    Register_keyLine->setFont(userFont);
    Register_QkeyLine->setFont(userFont);
    Register_aliasLine->setFont(userFont);
    Register_verifyinput->setFont(userFont);

    Register_mainVbox->addWidget(Register_inner, 0, Qt::AlignCenter);Register_Widget->setObjectName("555");
    Register_Widget->doconfigur_pixmap(":/PIXMAP/bench/music-registerback.jpg");

    //------User DatumInfo------"""
    Datum_head->setPixmap(":/PIXMAP/bench/music-loginback.jpg");
    Datum_head->setAttribute(Qt::WA_TranslucentBackground);

    Datum_historyBox->d_leftico_pix(":/PIXMAP/bench/add-sharp.png", ":/PIXMAP/bench/add-lowkey.png");
    Datum_historyBox->d_rightico_pix(":/PIXMAP/bench/top-lowkey.png",
                                    ":/PIXMAP/bench/top-sharp.png",
                                    ":/PIXMAP/bench/down-lowkey.png",
                                    ":/PIXMAP/bench/down-sharp.png");
    Datum_historyBox->d_filler(QColor(255,255,255));
    Datum_historyBox->d_filler_on(NTitleBar::BACKCOLOR, true);
    Datum_historyBox->ico(NT::LOCALTION_CENTER_LEFT)->doconfigur_imgsetting(NT::DRAWTYPE_RECT, NT::PIXLOAD_IGNORERATIO_LOWER, 2);

    Datum_bottomHbox->addWidget(Datum_register);
    Datum_bottomHbox->addWidget(Datum_submit);
    Datum_bottomHbox->setSpacing(3);

    Datum_idLine->setReadOnly(true);

    Datum_innerVbox->addWidget(Datum_head, 1, Qt::AlignCenter);
    Datum_innerVbox->addSpacing(8);
    Datum_innerVbox->addWidget(Datum_historyBox);
    Datum_innerVbox->addWidget(Datum_idLine, 0, Qt::AlignCenter);
    Datum_innerVbox->addWidget(Datum_keyLine, 0, Qt::AlignCenter);
    Datum_innerVbox->addWidget(Datum_QkeyLine, 0, Qt::AlignCenter);
    Datum_innerVbox->addWidget(Datum_aliasEdit, 0, Qt::AlignCenter);
    Datum_innerVbox->addLayout(Datum_bottomHbox);
    Datum_innerVbox->setAlignment(Qt::AlignCenter);

    Datum_historyBox->g_linedit()->setFont(userFont);
    Datum_idLine->setFont(userFont);
    Datum_keyLine->setFont(userFont);
    Datum_QkeyLine->setFont(userFont);
    Datum_aliasEdit->setFont(userFont);

    Datum_historyBox->g_linedit()->setPlaceholderText("History Head");
    Datum_idLine->setPlaceholderText("User");
    Datum_keyLine->setPlaceholderText("Password");
    Datum_QkeyLine->setPlaceholderText("QPassword");
    Datum_aliasEdit->setPlaceholderText("User Name");

    Datum_mainVbox->addWidget(Datum_inner, 0, Qt::AlignCenter);
    Datum_Widget->doconfigur_pixmap(":/PIXMAP/bench/music-loginback.jpg");
}



